-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: GitLab - use "approvals_left" instead of "approvals_before_merge" when checking if pull is mergeable #5049
Open
CaioAugustoo
wants to merge
7
commits into
runatlantis:main
Choose a base branch
from
CaioAugustoo:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CaioAugustoo
requested review from
GenPage,
lukemassa and
nitrocode
and removed request for
a team
October 31, 2024 02:54
CaioAugustoo
changed the title
fix: look up to "approvals_left" instead of "approvals_before_merge" when checking if pull is mergeable
fix: use "approvals_left" instead of "approvals_before_merge" when checking if pull is mergeable
Oct 31, 2024
Hi @CaioAugustoo, thanks for this. Some of the current GitLab tests are failing after your change. Can you take a look at these? New tests are also needed to cover this new code. |
X-Guardian
added
needs tests
Change requires tests
and removed
waiting-on-review
Waiting for a review from a maintainer
labels
Nov 5, 2024
X-Guardian
changed the title
fix: use "approvals_left" instead of "approvals_before_merge" when checking if pull is mergeable
fix: GitLab - use "approvals_left" instead of "approvals_before_merge" when checking if pull is mergeable
Nov 5, 2024
@CaioAugustoo, please sign your coming to pass the DCO test. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
go
Pull requests that update Go code
needs tests
Change requires tests
provider/gitlab
waiting-on-response
Waiting for a response from the user
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
what
Currently, Atlantis uses the
approvals_before_merge
field on GitLab client in order to check if MR is mergeable. But using that field is not correctly becauseapprovals_before_merge
is the configured number of approvals required for the MR and not the remaining number of approvals.This PR will fix that. Also, there is a related issue here.
why
In cases that GitLab users updates the
approvals_before_merge
on any MR, Atlantis will throwApply Failed: Pull request must be mergeable before running apply.
error. You can read more here.tests
Tested locally
references
Relates to #4949